# include <iostream>

using namespace std;

int main ( )
{
    int a[3][2],b[2][3],i,j;
    cout<<"enter the matrix:"<<endl;
    for (i=0;i<3;i++)
        for(j=0;j<2;j++)
            cin>>a[i][j];

    for (i=0;i<3;i++)
        for(j=0;j<2;j++)
           b[j][i]=a[i][j];


     for (i=0;i<2;i++)
     {
         cout<<endl;
        for(j=0;j<3;j++)
          cout<<b[i][j]<<" ";
     }
     cin>>i;
     return 0;
}